﻿CREATE TABLE [dbo].[datContacts] (
    [ContactID]             INT            IDENTITY (1, 1) NOT NULL,
    [IsOrganisation]        BIT            CONSTRAINT [DF_datContacts_IsOrganisation] DEFAULT ((0)) NOT NULL,
    [FirstName]             NVARCHAR (50)  NULL,
    [LastName]              NVARCHAR (50)  NULL,
    [CompanyName]           NVARCHAR (150) NULL,
    [CompanyNameAdditional] NVARCHAR (150) NULL,
    [Sex]                   TINYINT        CONSTRAINT [DF_datContacts_Sex] DEFAULT ((1)) NOT NULL,
    [LegalFormKey]          INT            NULL,
    [VatRegNo]              NVARCHAR (50)  NULL,
    [Notice]                NVARCHAR (MAX) NULL,
    [Birthday]              DATE           NULL,
    [SearchKeyword]         NVARCHAR (50)  NULL,
    [Department]            NVARCHAR (50)  NULL,
    [CreateOn]              DATETIME2 (7)  NULL,
    [CreateBy]              NVARCHAR (20)  NULL,
    [LastChangedOn]         DATETIME2 (7)  NULL,
    [LastChangedBy]         NVARCHAR (20)  NULL,
    [OldKey]                INT            NULL,
    CONSTRAINT [PK_datContacts] PRIMARY KEY CLUSTERED ([ContactID] ASC)
);






GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'UID Nummer bei Firmen', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'datContacts', @level2type = N'COLUMN', @level2name = N'VatRegNo';

